package cn.tedu.crm.operatelog.service.impl;

import cn.tedu.crm.operatelog.loggable.Loggable;
import cn.tedu.crm.operatelog.loggable.OperationType;
import cn.tedu.crm.operatelog.mapper.OperateLogMapper;
import cn.tedu.crm.operatelog.pojo.dto.OperateLogQuery;
import cn.tedu.crm.operatelog.pojo.vo.OperateLogVO;
import cn.tedu.crm.operatelog.service.OperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class OperateLogServiceImpl implements OperateLogService {
    @Autowired
    OperateLogMapper operateLogMapper;
    @Override
    public List<OperateLogVO> loadOperateLog(OperateLogQuery query) {
        log.debug("查询操作日志-service:入参{}",query);
        List<OperateLogVO> list = operateLogMapper.selectLogList(query);
        log.debug("查询操作日志-service:出参{}",list);
        return list;
    }
    @Override
    public void deleteOperateLog(List<Long> ids) {
        log.debug("删除操作日志-service:入参{}",ids);
        operateLogMapper.deleteBatchIds(ids);
    }
}
